package com.lazycat.backend.controller.account;


import com.lazycat.backend.service.impl.account.UserLoginServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

// 用户登陆接口

@RestController
public class UserLoginController {
    @Autowired
    private UserLoginServiceImpl userLoginService;

    @PostMapping("user/login/")
    public Map<String, Object> login(@RequestBody Map<String, String> map) {
        String username = map.get("username");
        String password = map.get("password");
        return userLoginService.login(username, password);
    }


}
